/*
 * @Author: your name
 * @Date: 2020-04-25 14:47:16
 * @LastEditTime: 2020-04-29 16:37:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \v-nw-h5\src\store\modules\logic\chat\getters.js
 */
export default {
    getterGroupIm(state){
        if(state.groupChat && state.groupChat.nim && Object.keys(state.groupChat.nim).length > 0){
            return state.groupChat.nim
        }
        let sessionGroupChat = window.sessionStorage.getItem('groupChat') || '';
        if(sessionGroupChat && Object.keys(state.groupChat.nim).length > 0){
            return sessionGroupChat;
        }
        return false
    },
    getterChatRoom(state){
        if(state.groupChat && state.groupChat.chatRoom && Object.keys(state.groupChat.chatRoom).length > 0){
            return state.groupChat.chatRoom
        }
        let sessionGroupChat = window.sessionStorage.getItem('chatRoom') || '';
        if(sessionGroupChat && Object.keys(state.groupChat.chatRoom).length > 0){
            return sessionGroupChat;
        }
        return false
    },
    getterHintList(state){
        state.hintList = window.sessionStorage.getItem('hintList') ? JSON.parse(window.sessionStorage.getItem('hintList')) : []
        return state.hintList
    }
}